module.exports = {
  outputDir: "dist",
  assetsDir: "assets",
  devServer: {
    open: true,
    host: "localhost",
    port: "8081",
    https: false,
    hotOnly: false,
    // before: require("./mock/mock-server.js"), // 拦截使用mock模拟数据
    proxy: {
      "/api": {
        //目标地址
        target: "http://localhost:8080",
        ws: true,
        //发送请求头host会被设置为target
        changeOrigin: true,
        pathRewrite: {
          "^/api": ""
        }
      }
    }
  }
};
